﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LaiHanDZDY.aspx.cs" Inherits="Web.Pages.YongShui._15.BaoBiaoGL.DanJuDY.LaiHanDZDY" Theme="Default" %>
<%@ Register TagPrefix="dx" Namespace="DevExpress.Web" Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>抽样调查</title>
    <script src="../../../../JS/jquery-1.11.1.min.js"></script>
    <script src="../../../../PageJS/wap.js"></script>
    <script type="text/javascript">
        function print() {
            var type = cmbLaiHanType.GetValue();
            var startDate = txtDate1.GetText().substring(0, 4) + "-" + txtDate1.GetText().substring(4, 6) + "-" + txtDate1.GetText().substring(6, 8);
            var endDate = txtDate2.GetText().substring(0, 4) + "-" + txtDate2.GetText().substring(4, 6) + "-" + txtDate2.GetText().substring(6, 8);
            var start = txtStart.GetText();
            var count = 0;
            var yonghuh = "0";
            if (rbnBut2.GetChecked()) {
                yonghuh = txtYHH1.GetText();
            }
            if (rbnBut3.GetChecked()) {
                yonghuh = txtYHH2.GetText();
                count = parseInt(txtCount.GetText());
            }
            var params = new Array();
            params.push("V_TYPE:" + type);
            params.push("V_STARTTIME:" + startDate);
            params.push("V_ENDTIME:" + endDate);
            params.push("V_POSITION:" + start);
            params.push("V_YONGHUH:" + yonghuh);
            params.push("V_COUNT:" + count);
            wap.common.printjx('ZhangDanDY', [
                { key: 'QUERYPARAM', value: params.join("|") },
                { key: 'BAOBIAOID', value: "100292" },
                { key: 'USERINFO', value: "csms" }
            ]);
        }
    </script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div class="tabletitle1" align="center">
    来函审批户地址打印
</div>
<asp:UpdatePanel ID="updatePanel1" runat="server">
<ContentTemplate>
<div>

<div>
<fieldset style="border: 1px solid #d0e4fe">

<div>
    <div style="border: 1px solid #d0e4fe; float: left; width: 27%;" id="condition">
        <table style="height: 270px; width: 100%">
            <tr>
                <td style="width: 40%;">
                    <span style="font-size: 12px;">来函类型：</span>
                </td>
                <td style="width: 60%;">
                    <asp:Panel runat="server" ID="Panel2">
                        <dx:ASPxComboBox runat="server" ID="cmbLaiHanType" ClientInstanceName="cmbLaiHanType" Width="100%">
                            <Items>
                                <dx:ListEditItem Text="全部" Value="2,3,5" Selected="true"  />
                                <dx:ListEditItem Text="年计划调整" Value="2"   />
                                <dx:ListEditItem Text="临时用水(计划转移)" Value="3"  />
                                <dx:ListEditItem Text="基建申请" Value="5" />
                            </Items>
                        </dx:ASPxComboBox>
                    </asp:Panel>
                </td>
            </tr>
            <tr>
                <td style="width: 40%;">
                    <span style="font-size: 12px;">审批日期：</span>
                </td>
                <td style="width: 60%;">
                    <table>
                        <tr>
                            <td><dx:ASPxTextBox ID="txtDate1" runat="server" ClientInstanceName="txtDate1" Width="80"></dx:ASPxTextBox></td>
                            <td>-</td>
                            <td><dx:ASPxTextBox ID="txtDate2" runat="server" ClientInstanceName="txtDate2" Width="80"></dx:ASPxTextBox></td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <hr/>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: left;">
                    <dx:ASPxRadioButton runat="server" ID="rbnBut1" Text="全部" GroupName="1" ClientInstanceName="rbnBut1" Checked="True"></dx:ASPxRadioButton>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: left;">
                    <table>
                        <tr>
                            <td style="width: 40px">
                                <dx:ASPxRadioButton runat="server" ID="rbnBut2" Text="从" GroupName="1" ClientInstanceName="rbnBut2"></dx:ASPxRadioButton>
                            </td>
                            <td style="width: 40%">
                                <dx:ASPxTextBox runat="server" ID="txtYHH1" Width="100%" ClientInstanceName="txtYHH1">
                                </dx:ASPxTextBox>
                            </td>
                            <td>
                                到最后
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: left;">
                    <table>
                        <tr>
                            <td style="width: 40px">
                                <dx:ASPxRadioButton runat="server" ID="rbnBut3" Text="从" GroupName="1" ClientInstanceName="rbnBut3"></dx:ASPxRadioButton>
                            </td>
                            <td>
                                <dx:ASPxTextBox runat="server" ID="txtYHH2" Width="100%" ClientInstanceName="txtYHH2">
                                </dx:ASPxTextBox>
                            </td>
                            <td>
                                打
                            </td>
                            <td>
                                <dx:ASPxTextBox runat="server" ID="txtCount" Text ="1" Width="100%" ClientInstanceName="txtCount">
                                </dx:ASPxTextBox>
                            </td>
                            <td>张</td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: left;">
                    <table style="width: 100%">
                        <tr>
                            <td style="width: 15%">从第</td>
                            <td style="width: 25%"><dx:ASPxTextBox runat="server" ID="txtStart" Text="1" Width="100%" ClientInstanceName="txtStart"></dx:ASPxTextBox></td>
                            <td style="width: 60%">格开始打印</td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <hr/>
                </td>
            </tr>
            <tr>
                <td>
                    <dx:ASPxLoadingPanel runat="server" ID="LoadPanel11" ClientInstanceName="LoadPanel" Text="正在查询"></dx:ASPxLoadingPanel>
                    <dx:ASPxButton runat="server" ID="btnChaXun" Text="查询" OnClick="btnChaXun_OnClick">
                        <ClientSideEvents Click="function(s,e){LoadPanel.Show();}"/>
                    </dx:ASPxButton>
                </td>
                <td>
                    <dx:ASPxButton ID="btnPrint" runat="server" Text="打印">
                        <ClientSideEvents Click="function(s,e){print();}"/>
                    </dx:ASPxButton>
                </td>
            </tr>
        </table>
    </div>
</div>
<div style="border: 1px solid #d0e4fe; float: right; width: 72%;">
    <div>
        <dx:ASPxLabel ID="zjl" Text="共0条" runat="server" ForeColor="Blue"></dx:ASPxLabel>
    </div>
    <div>
        <dx:ASPxGridView ID="gridLaiHanUser" runat="server" AutoGenerateColumns="False" Width="100%">
            <Columns>
                <dx:GridViewDataTextColumn FieldName="S_LAIHANBH" Caption="来函编号" Width="12%">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="S_YONGHUH" Caption="用户号" Width="10%">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="S_YONGHUM" Caption="用户名" Width="30%">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="S_DIZHI" Caption="用户地址" Width="28%">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="S_YOUBIAN" Caption="邮编" Width="10%">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="S_LIANXIBM" Caption="部门" Width="10%">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="S_LIANXIR" Caption="联系人" Width="10%">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn FieldName="S_LIANXIDH" Caption="联系电话" Width="10%">
                </dx:GridViewDataTextColumn>
            </Columns>
            <Settings VerticalScrollableHeight="500" VerticalScrollBarMode="Hidden"></Settings>
        </dx:ASPxGridView>
    </div>
    <br/>
</div>
</fieldset>
</div>
</div>
</ContentTemplate>

</asp:UpdatePanel>
</form>
   
</body>
</html>
